﻿using System;

using Ah.Testudin.Engine.Events;

using Microsoft.Xna.Framework;

namespace Ah.Testudin.Engine.Actors.Components
{
    public abstract class ActorComponentBase : IActorComponent
    {
        #region Private Member Variables

        protected readonly IEventManager _eventManager;

        #endregion

        #region Constructors

        public ActorComponentBase(
            Actor owner,
            IEventManager eventManager)
        {
            if (owner == null)
            {
                throw new ArgumentNullException("owner");
            }

            this.Owner = owner;

            _eventManager = eventManager;
        }

        #endregion

        #region IActorComponent

        public Actor Owner { get; private set; }

        public abstract void Update(GameTime gameTime);

        public virtual void Dispose()
        {
        }

        #endregion
    }
}
